<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Document sans titre</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
include("inc/connectbase.php");
$req=mysql_query("SELECT * FROM recupemails WHERE Etat='oui' AND Listing='1' ORDER BY Email") or die(mysql_error());
while($row=mysql_fetch_array($req)){
$Email=trim($row['Email']);
$idEmail=$row['idEmail'];
$Envoi=$row['Envoi'];
$verif=mysql_query("SELECT * FROM recupemails WHERE Email='$Email' AND Etat='oui'") or die(mysql_error());
$nbuser=mysql_num_rows($verif);
	if($nbuser>1){
	
		if($Envoi!=1){
		echo $idEmail." - ".$Email."<br>";
		//$up=mysql_query("UPDATE `recupemails` SET Etat='non' WHERE idEmail='$idEmail'") or die (mysql_error());
		}
	}
}
//$sup=mysql_query("DELETE FROM `recupemails` WHERE Listing='4'") or die(mysql_error());
/*$req=mysql_query("SELECT * FROM recupemails ORDER BY Email") or die(mysql_error());
while($row=mysql_fetch_array($req)){
$Email=trim($row['Email']);
$idEmail=$row['idEmail'];

$P=array("\r", "\n");
$SP=array("", "");
$VEmail=str_replace($P, $SP, $Email);
$up=mysql_query("UPDATE `recupemails` SET Email='$VEmail' WHERE idEmail='$idEmail'") or die (mysql_error());
echo $VEmail."<br>";
}*/
?>
</body>
</html>
